<?PHP
	class Pager {
		function getPath($path,$lapag){
			return join($lapag,explode("[PAGE]",$path));
		}
		function render($actual, $total, $path){
			$pager_content = "";
			if($actual>1){ 
				$pager_content .= linkTo("&#8249; Previous",Pager::getPath($path,$actual-1));
			}
			for($p = 1; $p<=$total; $p++){
				$pager_content .=" ";
				if($actual == $p){
					$pager_content .= " <span class=\"actual_page\">".$p."</span>";
				}else{
					$pager_content .= linkTo($p,Pager::getPath($path,$p));
				}
			}
			if($actual<$total){
				$pager_content .= " ".linkTo("Next &#8250;",Pager::getPath($path,$actual+1));
			}
			return $pager_content;
		}
	}
?>